<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Class::Tiny - Minimalist class construction - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Class-Tiny - MetaCPAN" href="https://metacpan.org/dist/Class-Tiny/releases.rss" />
        <link rel="canonical" href="./Class::Tiny.html" />
        <meta name="description" content="Minimalist class construction" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Class::Tiny" />
<meta name="twitter:title"       content="Class::Tiny" />
<meta name="twitter:description" content="Minimalist class construction" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Class::Tiny.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Class-Tiny was released.">
      <span class="relatize">04 Sep 2020 14:57:38 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Class-Tiny">Class-Tiny</a>
  </li>
  <li>
    Module version: 1.008
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Class-Tiny/source/lib/Class/Tiny.pm">Source</a>
    (<a href="https://metacpan.org/dist/Class-Tiny/source/lib/Class/Tiny.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Class-Tiny/source/lib/Class">Browse</a>
    (<a href="https://metacpan.org/dist/Class-Tiny/source/lib/Class?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Class-Tiny/changes">Changes</a>
    </li>
    <li>
      <a rel="noopener nofollow" class="nopopup" href="https://github.com/dagolden/Class-Tiny">Homepage</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Class-Tiny/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/dagolden/Class-Tiny">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/dagolden/Class-Tiny/issues">Issues</a>
      (5)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Class-Tiny+1.008" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/C/Class-Tiny.html?oncpan=1&amp;distmat=1&amp;version=1.008&amp;grade=2" style="color: #090">6785</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/C/Class-Tiny.html?oncpan=1&amp;distmat=1&amp;version=1.008&amp;grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/C/Class-Tiny.html?oncpan=1&amp;distmat=1&amp;version=1.008&amp;grade=4">1</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/DAGOLDEN/Class-Tiny-1.008">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Class-Tiny who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 2
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Class-Tiny-1.008/index.html">84.36% Coverage </a>
    </li>
    <li>
      License: apache_2_0
    </li>
    <li>
      Perl: v5.6.0
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Class-Tiny/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Class-Tiny-1.008.tar.gz">
      Download (<span itemprop="fileSize">24.08KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FDAGOLDEN%2FClass-Tiny-1.008%2Flib%2FClass%2FTiny.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Class-Tiny/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Class-Tiny/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Class-Tiny">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Class-Tiny">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Class/Tiny.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="DAGOLDEN/Class-Tiny-1.008"
>1.008
  (DAGOLDEN on 2020-09-04)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.007-TRIAL"
>1.007-TRIAL DEV
  (DAGOLDEN on 2020-09-02)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.006"
>1.006
  (DAGOLDEN on 2016-09-10)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.005-TRIAL"
>1.005-TRIAL DEV
  (DAGOLDEN on 2016-09-06)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.004"
>1.004
  (DAGOLDEN on 2015-10-30)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.001"
>1.001
  (DAGOLDEN on 2015-01-31)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.000"
>1.000
  (DAGOLDEN on 2014-07-16)</option>
<optgroup label="BackPAN">'
<option
  
  value="DAGOLDEN/Class-Tiny-1.003-TRIAL"
>1.003-TRIAL DEV
  (DAGOLDEN on 2015-10-27)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.015"
>0.015
  (DAGOLDEN on 2014-07-14)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.014"
>0.014
  (DAGOLDEN on 2013-11-28)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.013"
>0.013
  (DAGOLDEN on 2013-11-26)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.012"
>0.012
  (DAGOLDEN on 2013-11-01)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.011"
>0.011
  (DAGOLDEN on 2013-09-25)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.010"
>0.010
  (DAGOLDEN on 2013-09-18)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.009"
>0.009
  (DAGOLDEN on 2013-09-17)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.008"
>0.008
  (DAGOLDEN on 2013-09-08)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.007"
>0.007
  (DAGOLDEN on 2013-09-07)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.006"
>0.006
  (DAGOLDEN on 2013-09-05)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.005"
>0.005
  (DAGOLDEN on 2013-08-28)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.004"
>0.004
  (DAGOLDEN on 2013-08-21)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.003"
>0.003
  (DAGOLDEN on 2013-08-19)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.002"
>0.002
  (DAGOLDEN on 2013-08-19)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.001"
>0.001
  (DAGOLDEN on 2013-08-16)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/DAGOLDEN/Class-Tiny-1.008/diff/' + encodeURIComponent(this.value) + '/lib/Class/Tiny.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="DAGOLDEN/Class-Tiny-1.008"
>1.008
  (DAGOLDEN on 2020-09-04)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.007-TRIAL"
>1.007-TRIAL DEV
  (DAGOLDEN on 2020-09-02)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.006"
>1.006
  (DAGOLDEN on 2016-09-10)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.005-TRIAL"
>1.005-TRIAL DEV
  (DAGOLDEN on 2016-09-06)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.004"
>1.004
  (DAGOLDEN on 2015-10-30)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.001"
>1.001
  (DAGOLDEN on 2015-01-31)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.000"
>1.000
  (DAGOLDEN on 2014-07-16)</option>
<optgroup label="BackPAN">'
<option
  
  value="DAGOLDEN/Class-Tiny-1.003-TRIAL"
>1.003-TRIAL DEV
  (DAGOLDEN on 2015-10-27)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.015"
>0.015
  (DAGOLDEN on 2014-07-14)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.014"
>0.014
  (DAGOLDEN on 2013-11-28)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.013"
>0.013
  (DAGOLDEN on 2013-11-26)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.012"
>0.012
  (DAGOLDEN on 2013-11-01)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.011"
>0.011
  (DAGOLDEN on 2013-09-25)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.010"
>0.010
  (DAGOLDEN on 2013-09-18)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.009"
>0.009
  (DAGOLDEN on 2013-09-17)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.008"
>0.008
  (DAGOLDEN on 2013-09-08)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.007"
>0.007
  (DAGOLDEN on 2013-09-07)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.006"
>0.006
  (DAGOLDEN on 2013-09-05)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.005"
>0.005
  (DAGOLDEN on 2013-08-28)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.004"
>0.004
  (DAGOLDEN on 2013-08-21)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.003"
>0.003
  (DAGOLDEN on 2013-08-19)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.002"
>0.002
  (DAGOLDEN on 2013-08-19)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.001"
>0.001
  (DAGOLDEN on 2013-08-16)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Carp" title="Carp" class="ellipsis">Carp</a></li>
  <li><a href="https://metacpan.org/pod/strict" title="strict" class="ellipsis">strict</a></li>
  <li><a href="https://metacpan.org/pod/warnings" title="warnings" class="ellipsis">warnings</a></li>
  <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Class::Tiny/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Class%3A%3ATiny">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Class-Tiny">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/DAGOLDEN/Class-Tiny-1.008/view/lib/Class/Tiny.pm">This version</a>
    </li>
    <li>
      <a href="./Class::Tiny.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/YOUPONG"><img src="https://www.gravatar.com/avatar/45be30d66c5f5cb4d9ba25f35af52596?d=identicon&amp;s=20" title="YOUPONG" alt="YOUPONG"></a>
<a class="display-all" href="https://metacpan.org/author/KEEDI"><img src="https://www.gravatar.com/avatar/95f905a7a4ccc573c711e9d264c0fde8?d=identicon&amp;s=20" title="KEEDI" alt="KEEDI"></a>
<a class="display-all" href="https://metacpan.org/author/ETHER"><img src="https://www.gravatar.com/avatar/bdc5cd06679e732e262f6c1b450a0237?d=identicon&amp;s=20" title="ETHER" alt="ETHER"></a>
<a class="display-all" href="https://metacpan.org/author/TIMKA"><img src="https://www.gravatar.com/avatar/a350a413a98ecb2c89ed8f25241edddc?d=identicon&amp;s=20" title="TIMKA" alt="TIMKA"></a>
<a class="display-all" href="https://metacpan.org/author/ARJONES"><img src="https://www.gravatar.com/avatar/779fdd029141571e2650d9060978c1a1?d=identicon&amp;s=20" title="ARJONES" alt="ARJONES"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Class-Tiny/plussers">23 PAUSE users</a>
</div>
<div>
    14 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 6 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-cpan-author="ILMARI"
      data-contrib-email="ilmari@ilmari.org"
    >
      <a href="https://metacpan.org/author/ILMARI" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/a3059acdb28ce93c8b66a5f398b2cb39?d=identicon&amp;s=20" />
      Dagfinn Ilmari Mannsåker
      </a>
    </li>
    <li class="contributor"
      data-contrib-email="gelu@devnull.ro"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Gelu Lupas
    </li>
    <li class="contributor"
      data-cpan-author="ETHER"
      data-contrib-email="ether@cpan.org"
    >
      <a href="https://metacpan.org/author/ETHER" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/bdc5cd06679e732e262f6c1b450a0237?d=identicon&amp;s=20" />
      Karen Etheridge
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="MSTROUT"
      data-contrib-email="mstrout@cpan.org"
    >
      <a href="https://metacpan.org/author/MSTROUT" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/4e8e2db385219e064e6dea8fbd386434?d=identicon&amp;s=20" />
      Matt S Trout
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="DOLMEN"
      data-contrib-email="dolmen@cpan.org"
    >
      <a href="https://metacpan.org/author/DOLMEN" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/70d9b050bfe39350c234d710fadfcd39?d=identicon&amp;s=20" />
      Olivier Mengué
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="TOBYINK"
      data-contrib-email="tobyink@cpan.org"
    >
      <a href="https://metacpan.org/author/TOBYINK" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/f8faf2a422aecd1007b7d54c19ce7f39?d=identicon&amp;s=20" />
      Toby Inkster
      </a>
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/DAGOLDEN" class="author-name">David Golden</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Class/Tiny.pm&#39;" class="">
<option
  selected
  value="DAGOLDEN/Class-Tiny-1.008"
>1.008
  (DAGOLDEN on 2020-09-04)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.007-TRIAL"
>1.007-TRIAL DEV
  (DAGOLDEN on 2020-09-02)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.006"
>1.006
  (DAGOLDEN on 2016-09-10)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.005-TRIAL"
>1.005-TRIAL DEV
  (DAGOLDEN on 2016-09-06)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.004"
>1.004
  (DAGOLDEN on 2015-10-30)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.001"
>1.001
  (DAGOLDEN on 2015-01-31)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-1.000"
>1.000
  (DAGOLDEN on 2014-07-16)</option>
<optgroup label="BackPAN">'
<option
  
  value="DAGOLDEN/Class-Tiny-1.003-TRIAL"
>1.003-TRIAL DEV
  (DAGOLDEN on 2015-10-27)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.015"
>0.015
  (DAGOLDEN on 2014-07-14)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.014"
>0.014
  (DAGOLDEN on 2013-11-28)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.013"
>0.013
  (DAGOLDEN on 2013-11-26)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.012"
>0.012
  (DAGOLDEN on 2013-11-01)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.011"
>0.011
  (DAGOLDEN on 2013-09-25)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.010"
>0.010
  (DAGOLDEN on 2013-09-18)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.009"
>0.009
  (DAGOLDEN on 2013-09-17)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.008"
>0.008
  (DAGOLDEN on 2013-09-08)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.007"
>0.007
  (DAGOLDEN on 2013-09-07)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.006"
>0.006
  (DAGOLDEN on 2013-09-05)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.005"
>0.005
  (DAGOLDEN on 2013-08-28)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.004"
>0.004
  (DAGOLDEN on 2013-08-21)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.003"
>0.003
  (DAGOLDEN on 2013-08-19)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.002"
>0.002
  (DAGOLDEN on 2013-08-19)</option>
<option
  
  value="DAGOLDEN/Class-Tiny-0.001"
>0.001
  (DAGOLDEN on 2013-08-16)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Class-Tiny">Class-Tiny-1.008</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage four &#10;
          • 71 direct dependents &#10;          • 4041 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Class-Tiny-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Class-Tiny-1.008">
    <input type="hidden" name="author" value="DAGOLDEN">
    <input type="hidden" name="distribution" value="Class-Tiny">
    <button type="submit" class="favorite highlight"><span>37</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Class::Tiny.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>37</span> ++</a>
</div>
   / <span>Class::Tiny</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Class::Tiny.html#NAME">NAME</a></li>
  <li><a href="./Class::Tiny.html#VERSION">VERSION</a></li>
  <li><a href="./Class::Tiny.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./Class::Tiny.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./Class::Tiny.html#USAGE">USAGE</a>
    <ul>
      <li><a href="./Class::Tiny.html#Defining-attributes">Defining attributes</a></li>
      <li><a href="./Class::Tiny.html#Class::Tiny::Object-is-your-base-class">Class::Tiny::Object is your base class</a></li>
      <li><a href="./Class::Tiny.html#Object-construction">Object construction</a></li>
      <li><a href="./Class::Tiny.html#BUILD">BUILD</a></li>
      <li><a href="./Class::Tiny.html#DEMOLISH">DEMOLISH</a></li>
      <li><a href="./Class::Tiny.html#Introspection-and-internals">Introspection and internals</a></li>
    </ul>
  </li>
  <li><a href="./Class::Tiny.html#RATIONALE">RATIONALE</a>
    <ul>
      <li><a href="./Class::Tiny.html#Why-this-instead-of-Object::Tiny-or-Class::Accessor-or-something-else?">Why this instead of Object::Tiny or Class::Accessor or something else?</a></li>
      <li><a href="./Class::Tiny.html#Why-this-instead-of-Moose-or-Moo?">Why this instead of Moose or Moo?</a></li>
    </ul>
  </li>
  <li><a href="./Class::Tiny.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./Class::Tiny.html#CONTRIBUTORS">CONTRIBUTORS</a></li>
  <li><a href="./Class::Tiny.html#COPYRIGHT-AND-LICENSE">COPYRIGHT AND LICENSE</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Class::Tiny - Minimalist class construction</p>

<h1 id="VERSION">VERSION</h1>

<p>version 1.008</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<p>In <i>Person.pm</i>:</p>

<pre><code>  package Person;

  use Class::Tiny qw( name );

  1;</code></pre>

<p>In <i>Employee.pm</i>:</p>

<pre><code>  package Employee;
  use parent &#39;Person&#39;;

  use Class::Tiny qw( ssn ), {
    timestamp =&gt; sub { time }   # attribute with default
  };

  1;</code></pre>

<p>In <i>example.pl</i>:</p>

<pre><code>  use Employee;

  my $obj = Employee-&gt;new( name =&gt; &quot;Larry&quot;, ssn =&gt; &quot;111-22-3333&quot; );

  # unknown attributes are ignored
  my $obj = Employee-&gt;new( name =&gt; &quot;Larry&quot;, OS =&gt; &quot;Linux&quot; );
  # $obj-&gt;{OS} does not exist</code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>This module offers a minimalist class construction kit in around 120 lines of code. Here is a list of features:</p>

<ul>

<li><p>defines attributes via import arguments</p>

</li>
<li><p>generates read-write accessors</p>

</li>
<li><p>supports lazy attribute defaults</p>

</li>
<li><p>supports custom accessors</p>

</li>
<li><p>superclass provides a standard <code>new</code> constructor</p>

</li>
<li><p><code>new</code> takes a hash reference or list of key/value pairs</p>

</li>
<li><p><code>new</code> supports providing <code>BUILDARGS</code> to customize constructor options</p>

</li>
<li><p><code>new</code> calls <code>BUILD</code> for each class from parent to child</p>

</li>
<li><p>superclass provides a <code>DESTROY</code> method</p>

</li>
<li><p><code>DESTROY</code> calls <code>DEMOLISH</code> for each class from child to parent</p>

</li>
</ul>

<p>Multiple-inheritance is possible, with superclass order determined via <a href="https://metacpan.org/pod/mro#Functions">mro::get_linear_isa</a>.</p>

<p>It uses no non-core modules for any recent Perl. On Perls older than v5.10 it requires <a href="./MRO::Compat.html">MRO::Compat</a>. On Perls older than v5.14, it requires <a href="https://metacpan.org/pod/Devel::GlobalDestruction">Devel::GlobalDestruction</a>.</p>

<h1 id="USAGE">USAGE</h1>

<h2 id="Defining-attributes"><a id="Defining"></a>Defining attributes</h2>

<p>Define attributes as a list of import arguments:</p>

<pre><code>    package Foo::Bar;

    use Class::Tiny qw(
        name
        id
        height
        weight
    );</code></pre>

<p>For each attribute, a read-write accessor is created unless a subroutine of that name already exists:</p>

<pre><code>    $obj-&gt;name;               # getter
    $obj-&gt;name( &quot;John Doe&quot; ); # setter</code></pre>

<p>Attribute names must be valid subroutine identifiers or an exception will be thrown.</p>

<p>You can specify lazy defaults by defining attributes with a hash reference. Keys define attribute names and values are constants or code references that will be evaluated when the attribute is first accessed if no value has been set. The object is passed as an argument to a code reference.</p>

<pre><code>    package Foo::WithDefaults;

    use Class::Tiny qw/name id/, {
        title     =&gt; &#39;Peon&#39;,
        skills    =&gt; sub { [] },
        hire_date =&gt; sub { $_[0]-&gt;_build_hire_date },
    };</code></pre>

<p>When subclassing, if multiple accessors of the same name exist in different classes, any default (or lack of default) is determined by standard method resolution order.</p>

<p>To make your own custom accessors, just pre-declare the method name before loading Class::Tiny:</p>

<pre><code>    package Foo::Bar;

    use subs &#39;id&#39;;

    use Class::Tiny qw( name id );

    sub id { ... }</code></pre>

<p>Even if you pre-declare a method name, you must include it in the attribute list for Class::Tiny to register it as a valid attribute.</p>

<p>If you set a default for a custom accessor, your accessor will need to retrieve the default and do something with it:</p>

<pre><code>    package Foo::Bar;

    use subs &#39;id&#39;;

    use Class::Tiny qw( name ), { id =&gt; sub { int(rand(2*31)) } };

    sub id {
        my $self = shift;
        if (@_) {
            return $self-&gt;{id} = shift;
        }
        elsif ( exists $self-&gt;{id} ) {
            return $self-&gt;{id};
        }
        else {
            my $defaults =
                Class::Tiny-&gt;get_all_attribute_defaults_for( ref $self );
            return $self-&gt;{id} = $defaults-&gt;{id}-&gt;();
        }
    }</code></pre>

<h2 id="Class::Tiny::Object-is-your-base-class"><a id="Class"></a>Class::Tiny::Object is your base class</h2>

<p>If your class <b>does not</b> already inherit from some class, then Class::Tiny::Object will be added to your <code>@ISA</code> to provide <code>new</code> and <code>DESTROY</code>.</p>

<p>If your class <b>does</b> inherit from something, then no additional inheritance is set up. If the parent subclasses Class::Tiny::Object, then all is well. If not, then you&#39;ll get accessors set up but no constructor or destructor. Don&#39;t do that unless you really have a special need for it.</p>

<p>Define subclasses as normal. It&#39;s best to define them with <a href="https://metacpan.org/pod/base">base</a>, <a href="https://metacpan.org/pod/parent">parent</a> or <a href="https://metacpan.org/pod/superclass">superclass</a> before defining attributes with Class::Tiny so the <code>@ISA</code> array is already populated at compile-time:</p>

<pre><code>    package Foo::Bar::More;

    use parent &#39;Foo::Bar&#39;;

    use Class::Tiny qw( shoe_size );</code></pre>

<h2 id="Object-construction"><a id="Object"></a>Object construction</h2>

<p>If your class inherits from Class::Tiny::Object (as it should if you followed the advice above), it provides the <code>new</code> constructor for you.</p>

<p>Objects can be created with attributes given as a hash reference or as a list of key/value pairs:</p>

<pre><code>    $obj = Foo::Bar-&gt;new( name =&gt; &quot;David&quot; );

    $obj = Foo::Bar-&gt;new( { name =&gt; &quot;David&quot; } );</code></pre>

<p>If a reference is passed as a single argument, it must be able to be dereferenced as a hash or an exception is thrown.</p>

<p>Unknown attributes in the constructor arguments will be ignored. Prior to version 1.000, unknown attributes were an error, but this made it harder for people to cleanly subclass Class::Tiny classes so this feature was removed.</p>

<p>You can define a <code>BUILDARGS</code> method to change how arguments to new are handled. It will receive the constructor arguments as they were provided and must return a hash reference of key/value pairs (or else throw an exception).</p>

<pre><code>    sub BUILDARGS {
       my $class = shift;
       my $name = shift || &quot;John Doe&quot;;
       return { name =&gt; $name };
     };

     Foo::Bar-&gt;new( &quot;David&quot; );
     Foo::Bar-&gt;new(); # &quot;John Doe&quot;</code></pre>

<p>Unknown attributes returned from <code>BUILDARGS</code> will be ignored.</p>

<h2 id="BUILD">BUILD</h2>

<p>If your class or any superclass defines a <code>BUILD</code> method, it will be called by the constructor from the furthest parent class down to the child class after the object has been created.</p>

<p>It is passed the constructor arguments as a hash reference. The return value is ignored. Use <code>BUILD</code> for validation, checking required attributes or setting default values that depend on other attributes.</p>

<pre><code>    sub BUILD {
        my ($self, $args) = @_;

        for my $req ( qw/name age/ ) {
            croak &quot;$req attribute required&quot; unless defined $self-&gt;$req;
        }

        croak &quot;Age must be non-negative&quot; if $self-&gt;age &lt; 0;

        $self-&gt;msg( &quot;Hello &quot; . $self-&gt;name );
    }</code></pre>

<p>The argument reference is a copy, so deleting elements won&#39;t affect data in the original (but changes will be passed to other BUILD methods in <code>@ISA</code>).</p>

<h2 id="DEMOLISH">DEMOLISH</h2>

<p>Class::Tiny provides a <code>DESTROY</code> method. If your class or any superclass defines a <code>DEMOLISH</code> method, they will be called from the child class to the furthest parent class during object destruction. It is provided a single boolean argument indicating whether Perl is in global destruction. Return values are ignored. Errors are caught and rethrown.</p>

<pre><code>    sub DEMOLISH {
        my ($self, $global_destruct) = @_;
        $self-&gt;cleanup();
    }</code></pre>

<h2 id="Introspection-and-internals"><a id="Introspection"></a>Introspection and internals</h2>

<p>You can retrieve an unsorted list of valid attributes known to Class::Tiny for a class and its superclasses with the <code>get_all_attributes_for</code> class method.</p>

<pre><code>    my @attrs = Class::Tiny-&gt;get_all_attributes_for(&quot;Employee&quot;);
    # returns qw/name ssn timestamp/</code></pre>

<p>Likewise, a hash reference of all valid attributes and default values (or code references) may be retrieved with the <code>get_all_attribute_defaults_for</code> class method. Any attributes without a default will be <code>undef</code>.</p>

<pre><code>    my $def = Class::Tiny-&gt;get_all_attribute_defaults_for(&quot;Employee&quot;);
    # returns {
    #   name =&gt; undef,
    #   ssn =&gt; undef
    #   timestamp =&gt; $coderef
    # }</code></pre>

<p>The <code>import</code> method uses two class methods, <code>prepare_class</code> and <code>create_attributes</code> to set up the <code>@ISA</code> array and attributes. Anyone attempting to extend Class::Tiny itself should use these instead of mocking up a call to <code>import</code>.</p>

<p>When the first object is created, linearized <code>@ISA</code>, the valid attribute list and various subroutine references are cached for speed. Ensure that all inheritance and methods are in place before creating objects. (You don&#39;t want to be changing that once you create objects anyway, right?)</p>

<h1 id="RATIONALE">RATIONALE</h1>

<h2 id="Why-this-instead-of-Object::Tiny-or-Class::Accessor-or-something-else?"><a id="Why"></a><a id="Why-this-instead-of-Object::Tiny-or-Class::Accessor-or-something-else"></a>Why this instead of Object::Tiny or Class::Accessor or something else?</h2>

<p>I wanted something so simple that it could potentially be used by core Perl modules I help maintain (or hope to write), most of which either use <a href="https://metacpan.org/pod/Class::Struct">Class::Struct</a> or roll-their-own OO framework each time.</p>

<p><a href="https://metacpan.org/pod/Object::Tiny">Object::Tiny</a> and <a href="https://metacpan.org/pod/Object::Tiny::RW">Object::Tiny::RW</a> were close to what I wanted, but lacking some features I deemed necessary, and their maintainers have an even more strict philosophy against feature creep than I have.</p>

<p>I also considered <a href="./Class::Accessor.html">Class::Accessor</a>, which has been around a long time and is heavily used, but it, too, lacked features I wanted and did things in ways I considered poor design.</p>

<p>I looked for something else on CPAN, but after checking a dozen class creators I realized I could implement exactly what I wanted faster than I could search CPAN for something merely sufficient.</p>

<p>In general, compared to most things on CPAN (other than Object::Tiny), Class::Tiny is smaller in implementation and simpler in API.</p>

<p>Specifically, here is how Class::Tiny (&quot;C::T&quot;) compares to Object::Tiny (&quot;O::T&quot;) and Class::Accessor (&quot;C::A&quot;):</p>

<pre><code> FEATURE                            C::T    O::T      C::A
 --------------------------------------------------------------
 attributes defined via import      yes     yes       no
 read/write accessors               yes     no        yes
 lazy attribute defaults            yes     no        no
 provides new                       yes     yes       yes
 provides DESTROY                   yes     no        no
 new takes either hashref or list   yes     no (list) no (hash)
 Moo(se)-like BUILD/DEMOLISH        yes     no        no
 Moo(se)-like BUILDARGS             yes     no        no
 no extraneous methods via @ISA     yes     yes       no</code></pre>

<h2 id="Why-this-instead-of-Moose-or-Moo?"><a id="Why1"></a><a id="Why-this-instead-of-Moose-or-Moo"></a>Why this instead of Moose or Moo?</h2>

<p><a href="Moose.html">Moose</a> and <a href="Moo.html">Moo</a> are both excellent OO frameworks. Moose offers a powerful meta-object protocol (MOP), but is slow to start up and has about 30 non-core dependencies including XS modules. Moo is faster to start up and has about 10 pure Perl dependencies but provides no true MOP, relying instead on its ability to transparently upgrade Moo to Moose when Moose&#39;s full feature set is required.</p>

<p>By contrast, Class::Tiny has no MOP and has <b>zero</b> non-core dependencies for Perls in the <a href="https://metacpan.org/pod/perlpolicy">support window</a>. It has far less code, less complexity and no learning curve. If you don&#39;t need or can&#39;t afford what Moo or Moose offer, this is intended to be a reasonable fallback.</p>

<p>That said, Class::Tiny offers Moose-like conventions for things like <code>BUILD</code> and <code>DEMOLISH</code> for some minimal interoperability and an easier upgrade path.</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>David Golden &lt;dagolden@cpan.org&gt;</p>

<h1 id="CONTRIBUTORS">CONTRIBUTORS</h1>

<ul>

<li><p>Dagfinn Ilmari Manns&aring;ker &lt;ilmari@ilmari.org&gt;</p>

</li>
<li><p>David Golden &lt;xdg@xdg.me&gt;</p>

</li>
<li><p>Gelu Lupas &lt;gelu@devnull.ro&gt;</p>

</li>
<li><p>Karen Etheridge &lt;ether@cpan.org&gt;</p>

</li>
<li><p>Matt S Trout &lt;mstrout@cpan.org&gt;</p>

</li>
<li><p>Olivier Mengu&eacute; &lt;dolmen@cpan.org&gt;</p>

</li>
<li><p>Toby Inkster &lt;tobyink@cpan.org&gt;</p>

</li>
</ul>

<h1 id="COPYRIGHT-AND-LICENSE"><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1>

<p>This software is Copyright (c) 2013 by David Golden.</p>

<p>This is free software, licensed under:</p>

<pre><code>  The Apache License, Version 2.0, January 2004</code></pre></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Class::Tiny, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Class::Tiny</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Class::Tiny</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Class::Tiny.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
